package lgs.hm.config;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

import lgs.hm.model.User;
@Component
public class String2UserConver implements Converter<String,User>  {

	@Override
	public User convert(String arg0) {
		String[] args = arg0.split("::");
		User user = new User();
		user.setUserName(args[0]);
		user.setPassword(args[1]);
		user.setUserId(Integer.valueOf(args[2]));
		return user;
	}
	
	

}
